var industry_list = [
    {
       "parent_ind" : "女装",
       "name" : "连衣裙"
    },
    {
        "parent_ind" : "连衣裙",
        "name" : "纯棉"
     },
     {
        "parent_ind" : "纯棉",
        "name" : "帆布"
     },
    {
       "name": "女装"
    },
    {
       "parent_ind" : "女装",
       "name" : "半身裙"
    },
    {
       "parent_ind" : "女装",
       "name" : "A字裙"
    },
    
    {
       "name": "数码"
    },
    {
      "parent_ind" : "数码",
       "name": "电脑配件"
    },
    {
      "parent_ind" : "电脑配件",
       "name": "内存"
    } 
  ]

 
 
function  grade(data){
    let arr=[],o={};
    for(list of data){
        if(!list.parent_ind){
            o[list['name']] = {}
        }else{
            arr.push(list) 
        }
    }
    return {o,arr}
}
function groupBy(o,arr){
    let obj={};
    let newArr=[]
    for(l of arr){
        if(o[l.parent_ind]) {
           
            o[l.parent_ind][l.name] = {}
            obj[l.name] = o[l.parent_ind][l.name]
           
        }else newArr.push(l)
    }
    
    if(newArr.length>0&&Object.keys(obj).length>0){
        groupBy(obj,newArr)
    } 
}

  function convert_format(data){
    let gradeData = grade(data)
    let oIndustry = gradeData.o
    let arr_list = gradeData.arr
    groupBy(oIndustry,arr_list)
    return oIndustry
  }

console.log(convert_format(industry_list))  